% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shape2zip.R
\name{shape2zip}
\alias{shape2zip}
\title{Save spatial data.frame as shapefile.zip}
\usage{
shape2zip(shp, file = "shapefile.zip")
}
\arguments{
\item{shp}{a spatial data.frame as from \code{\link[=shapefile_from_any]{shapefile_from_any()}} or \code{\link[sf:st_read]{sf::st_read()}}}

\item{file}{full path to and name of the .zip file to create}
}
\value{
normalized path of the cleaned up file param (path and name of .zip)
}
\description{
Save spatial data.frame as shapefile.zip
}
\examples{
# shp <- shapes_from_fips(fips = name2fips(c('tucson,az', 'tempe, AZ')))
shp <- testshapes_2
\dontrun{
fname <- file.path(tempdir(), "myfile.zip")
fpath <- shape2zip(shp, fname)
file.exists(fpath)
zip::zip_list(fpath)
# read it back in
shp2 <- shapefile_from_any(fpath)
}

}
